Add support for building with Bazel This change adds support for in Gerrit tree and standalone Bazel build modes, using bazlets. To build a single plugin, run: $ bazel build example-simpleSshCommand INFO: Found 1 target... Target //example-simpleSshCommand:example-simpleSshCommand up-to-date: bazel-genfiles/example-simpleSshCommand/example-simpleSshCommand.jar INFO: Elapsed time: 0.171s, Critical Path: 0.07s To build all plugins at once, run: $ bazel build :all INFO: Found 1 target... Target //:all up-to-date: bazel-genfiles/all.zip INFO: Elapsed time: 0.326s, Critical Path: 0.21s $ unzip -t bazel-genfiles/all.zip Archive: bazel-genfiles/all.zip testing: example-simpleSshCommand.jar OK Change-Id: I5ec70eec2492e1d2bd3e968135ba8206abf82c22
diff --git a/BUILD b/BUILD new file mode 100644 index 0000000..16bf5ea --- /dev/null +++ b/BUILD
@@ -0,0 +1,14 @@ +genrule( + name = "all", + srcs = [ + "//example-simpleSshCommand", + ], + outs = ["all.zip"], + cmd = " && ".join([ + "p=$$PWD", + "t=$$(mktemp -d || mktemp -d -t bazel-tmp)", + "cp $(SRCS) $$t", + "cd $$t", + "zip -qr $$p/$@ .", + ]), +)